#pragma once
#include <XVirtualD3D11Drawer.h>
#include <XD3D11Ball.h>
#include <xnamath.h>

#pragma comment (lib, "XD3D11Shapes.lib")

class XCxcD3D11Drawer :
	public XVirtualD3D11Drawer
{
public:
	XCxcD3D11Drawer();
	virtual ~XCxcD3D11Drawer();

	struct ConstantBuffer
	{
		XMMATRIX World;
		XMMATRIX View;
		XMMATRIX Projection;
	};

	void initializeScene();
	virtual void update();
	virtual void draw();
	void rotateY(float ang);
	void rotateX(float ang);
	void rotateZ(float ang);

protected:
	XMFLOAT4X4 world;
	XMFLOAT4X4 view;
	XMFLOAT4X4 projection;
	ID3D11Buffer *constantBuffer;

	ID3D11InputLayout *vertexLayout;

	ID3D11VertexShader *vertexShader;
	ID3D11PixelShader *pixelShader;
	ID3D10Blob *vertexShaderBuffer;
	ID3D10Blob *pixelShaderBuffer;

	XD3D11Ball *ball;
};

